package LibraryNavigation;

import java.io.Serializable;

public class LibraryObject implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -9005426571991506897L;

	public static final int STRUCT_ROAD = 0;
	public static final int STRUCT_BOOKSHELF = 1;
	public static final int STRUCT_LIBRARY_ENTERENCE = 2;
	public static final int STRUCT_WALL = 3;
	public static final int STRUCT_PATH = 9;

	public static final int PROPERTY_NORMAL = 0;
	public static final int PROPERTY_DESTINATION = 1;
	public static final int PROPERTY_PATH = 2;

	public static final int FRONT = 2;
	public static final int BEHIND = 0;
	public static final int LEFT = 1;
	public static final int RIGHT = 3;
	public static final int CENTER = 4;

	private int objNumber;
	private int objDirection;
	private int objStructure;
	private int objCategory;
	private int property;
	private int x, y;

	public LibraryObject() {
		this.objNumber = 0;
		this.objStructure = 0;
		this.objCategory = -1;
		this.property = 0;
		this.x = -1;
		this.y = -1;
		this.objDirection = CENTER;
	}

	public void setStructure(int number, int obj, int category, int property,
			int x, int y, int direction) {
		this.objNumber = number;
		this.objStructure = obj;
		this.objCategory = category;
		this.property = property;
		this.x = x;
		this.y = y;
		this.objDirection = direction;
	}

	public int getX() {
		return this.x;
	}

	public void setPath(int x, int y) {
		this.objNumber = -1;
		this.objStructure = STRUCT_PATH;
		this.objCategory = -1;
		this.property = PROPERTY_PATH;
		this.x = x;
		this.y = y;
		this.objDirection = CENTER;
	}

	public void setDes(int direction) {
		this.property = PROPERTY_DESTINATION;
		this.objDirection = direction;
	}

	public int getY() {
		return this.y;
	}

	public int getProperty() {
		return this.property;
	}

	public int getObjectValue() {
		return this.objStructure;
	}

	public int getCategory() {
		return this.objCategory;
	}

	public int getObjNumber() {
		return this.objNumber;
	}

	public int getDirection() {
		return this.objDirection;
	}
}
